/*
 * Name: $RCSfile: Constants.java,v $
 * Version: $Revision: 1.1 $
 * Date: $Date: Dec 15, 2011 1:56:00 PM $
 *
 * Copyright (C) 2011 DirecTV, Inc. All rights reserved.
 */

package com.admissions.common;

import java.io.File;

import android.os.Environment;

/**
 * Class interface constants using in application
 * 
 * @author LongNH
 * 
 */
public interface Constants {
    String STATUS = "status";

    String RESPONSE = "response";

    String RESULT = "result";

    /** Folder name is lazy list */
    String LAZY = "LazyList";

    /** constant is the using validate structure of email */
    String EMAIL_REGEX = "^[\\w-_\\.+]*[\\w-_\\.]\\@([\\w]+\\.)+[\\w]+[\\w]$";

    /**
     * Constant is name of file account.xml store in device and it using when
     * created file or read information of file.
     * */
    String PREFS_NAME_ACOUNT = "account";

    /** This is key and using it when write and read first name in account.xml */
    String PREF_FIRST_NAME = "firstName";

    /** This is key and using it when write and read last name in account.xml */
    String PREF_LAST_NAME = "lastName";

    /** This is key and using it when write and read email in account.xml */
    String PREF_EMAIL = "email";

    /** This is key and using it when write and read password in account.xml */
    String PREF_PASSWORD = "password";

    /** This is key and using it when write and read tokend id in account.xml */
    String PREFS_TOKENID = "tokenid";

    /** Value default of field in account */
    String KEY_NULL = "NULL";

    /** This constant of type sort by date */
    String TYPE_SORT_APP_BY_DATE = "date";

    /** This constant of type sort by name */
    String TYPE_SORT_APP_BY_NAME = "name";

    /** html tag header open */
    String START = "<html>" + "<head></head>"
            + "<body style=\"text-align:justify;color:black;font-size:13px;\">";

    /** html tag header close */
    String END = "</body>" + "</html>";

    /** Link service of main screen update function */
    String URL_MAINSCREEN_UPDATES = "http://10.16.61.74:8888/dtvapps/update";

    /** Base link service */
    String BASE_LINK_SERVICE = "http://10.16.6.43:8080/DirecTVMobileServer/rest/";

    /** Link service of list version function */
    String URL_LIST_VERSION = BASE_LINK_SERVICE + "apps/listversion";

    /** Link service of main screen all app function */
    String URL_MAINSCREEN_ALL_APP = BASE_LINK_SERVICE + "apps/allapp";

    /** Link service of signing function */
    String URL_SIGNIN = BASE_LINK_SERVICE + "users/login";

    /** Link service of update function */
    String URL_UPDATE = BASE_LINK_SERVICE + "apps/update";

    /** Link service of signup function */
    String URL_SIGNUP = BASE_LINK_SERVICE + "users/signup";

    /** Link service of changer password function */
    String URL_CHANGER_PASSWORD = BASE_LINK_SERVICE + "users/changepassword";

    /** Link service of forgot password function */
    String URL_FOROGT_PASSWORD = BASE_LINK_SERVICE + "users/forgotpassword";

    /** Param list app id */
    String PARAM_LIST_APPID = "listAppID";

    /** Link service of feed back function */
    String URL_FEEDBACK = BASE_LINK_SERVICE + "users/feedback";

    /** Link service of detail of app function */
    String URL_DETAIL = BASE_LINK_SERVICE + "apps/detail";

    /** Param first name of function signup */
    String PARAM_SIGNUP_FIRSTNAME = "firstname";

    /** Param last name of function signup */
    String PARAM_SIGNUP_LASTNAME = "lastname";

    /** Param email of function signup */
    String PARAM_SIGNUP_EMAIL = "email";

    /** Param password of function signup */
    String PARAM_SIGNUP_PASSWORD = "password";

    /** Param department of function signup */
    String PARAM_SIGNUP_DEPARTMENT = "department";

    /** Param employee id of function signup */
    String PARAM_SIGNUP_EMPLOYEE = "employeeId";

    /** Param reason of function signup */
    String PARAM_SIGNUP_REASON = "reason";

    /** Param email of function signing */
    String PARAM_SIGNIN_EMAIL = "email";

    /** Param password of function signup */
    String PARAM_SIGNIN_PASSWORD = "password";

    /** Param screen of function signing */
    int SCREEN_SIGNIN = 1;

    /** Param screen of function signup */
    int SCREEN_SIGNUP = 2;

    /** Param screen of function main screen */
    int SCREEN_MAINSCREEN = 3;

    /** Param token id of main screen */
    String PARAM_MAINSCREEN_TOKENID = "tokenId";

    /** Param old app of main screen */
    String PARAM_MAINSCREEN_OLDAPPS = "oldapps";

    /** Param old app of main screen */
    String PARAM_MAINSCREEN_DEVICE_TYPE = "deviceType";

    String VALUES_DEVICE_TYPE = "Android_Mobile";

    /** Param old app of main screen */
    String PARAM_MAINSCREEN_DEVICE_FLATFORM = "devicePlatform";

    String VALUE_MAINSCREEN_DEVICE_FLATFORM = "Android";

    String VALUES_DEVICE_FLATFORM = "Android_Tablet";

    /** Param token id of list version */
    String PARAM_LISTVERSION_TOKENID = "tokenId";

    /** Param old version of list version */
    String PARAM_LISTVERSION_OLDVERSIONS = "oldversion";

    /** Param app id of list version */
    String PARAM_LISTVERSION_APPID = "appId";

    /** Param token id of detail function */
    String PARAM_DETAILS_TOKENID = "tokenId";

    /** Param version id of detail function */
    String PARAM_DETAILS_VERSIONID = "versionId";

    /** Param app id of detail function */
    String PARAM_DETAILS_APPID = "appId";

    /** Flag of status login true */
    String SIGNIN_YES = "1";

    /** Flag of status login false */
    String SIGNIN_NO = "0";

    /** Path of file database */
    File phoneRoot = Environment.getDataDirectory();

    // final File file = new File(phoneRoot + "/data/" + "com.xl.main.activity/files/", nameFile);
    String DB_PATH = phoneRoot + "/data/com.directv/databases/";

    /** It is name of DB file */
    String DB_NAME = "DirectvSQLite";

    /** Name of table all app */
    String TABLE_ALL_APP = "t_AllApps";

    /** Name of table update app */
    String TABLE_UPDATES = "t_Updates";

    /** Name of table version */
    String TABLE_VERSION = "t_Version";

    /** Name of table detail */
    String TABLE_DETAIL = "t_Detail";

    /** name of installed table***/
    String TABLE_INSTALLED = "t_Installed";

    /** Name of colums filed id in table all app */
    String ALLAPP_FILED_ID = "f_ID";

    /** Name of colums name app in table all app */
    String ALLAPP_FILED_NameApp = "f_NameApp";

    /** Name of colums date in table all app */
    String ALLAPP_FILED_Date = "f_Date";

    /** Name of colums thumbnail in table all app */
    String ALLAPP_FILED_Thumbnail = "f_Thumbnail";

    /** Name of colums deleted in table all app */
    String ALLAPP_FILED_Deleted = "f_Deleted";

    /** Name of colums hasupdate in table all app */
    String ALLAPP_FILED_HasUpdate = "f_HasUpdate";

    /** Name of colums thumbnail in table all app */
    String ALLAPP_FILED_LastedVersion = "f_LastedVersion";

    /** Name of colums app id in table version */
    String VERSION_FILED_AppID = "f_AppID";

    /** Name of colums version id in table version */
    String VERSION_FILED_VersionID = "f_VersionID";

    /** Name of colums name version in table version */
    String VERSION_FILED_NameVersion = "f_NameVersion";

    /** Name of colums released in table version */
    String VERSION_FILED_Released = "f_Released";

    /** Name of colums app id in table detail */
    String DETAIL_FILED_AppID = "f_AppID";

    /** Name of colums version id in table detail */
    String DETAIL_FILED_VersionID = "f_VersionID";

    /** Name of colums link apk in table detail */
    String DETAIL_FILED_LinkApk = "f_LinkApk";

    /** Name of colums released id in table detail */
    String DETAIL_FILED_Date = "f_Released";

    /** Name of colums discription id in table detail */
    String DETAIL_FILED_Discription = "f_Discription";

    /** Name of colums name version id in table detail */
    String DETAIL_FILED_NameVersion = "f_NameVersion";

    /** Name of colums name app id in table detail */
    String DETAIL_FILED_NameApp = "f_NameApp";

    /** Name of colums released notes id in table detail */
    String DETAIL_FILED_ReleasedNotes = "f_ReleaseNotes";

    /** Name of colums size id in table detail */
    String DETAIL_FILED_Size = "f_Size";

    /** Name of colums thumbnail id in table detail */
    String DETAIL_FILED_Thumbnail = "f_Thumbnail";

    /** Array filed of table All app */
    String[] ALLAPP_ARRAY_FIELD = {
            "f_ID", "f_NameApp", "f_Date", "f_Thumbnail", "f_Deleted", "f_HasUpdate",
            "f_LastedVersion"
    };

    /** Array filed of table version */
    String[] VERSION_ARRAY_FIELD = {
            "f_NameVersion", "f_AppID", "f_VersionID", "f_Released"
    };

    /** Array filed of table detail */
    String[] DETAIL_ARRAY_FIELD = {
            "f_AppID", "f_VersionID", "f_NameApp", "f_NameVersion", "f_Size", "f_Released",
            "f_Thumbnail", "f_LinkApk", "f_Discription", "f_ReleaseNotes"
    };

    /** Name of colums thumbnail id in table detail */
    String INSTALLES_FILED_Date = "f_Date";

    String INSTALLES_FILED_LastedVersion = "f_LastedVersion";

    String INSTALLES_FILED_Thumbnail = "f_Thumbnail";

    String INSTALLES_FILED_ID = "f_ID";

    String INSTALLES_FILED_AppPackageName = "f_AppPackageName";

    String INSTALLES_FILED_AppName = "f_AppName";

    String INSTALLES_FILED_VersionName = "f_VersionName";

    String INSTALLES_FILED_VersionCode = "f_VersionCode";

    /** Downloading messages */
    String DOWNLOADING_MESSAGES = "Downloading";

    /** Connecting messages */
    String CONNECTING_MESSAGES = "Connecting";

    /** Install messages */
    String INSTALL_MESSAGES = "Installing";

    /** Key to transfer values of app id from all app to list version via intent */
    String KEY_STRANFER_FROM_ALLAPP_TO_LISTVERSION = "KEY_STRANFER_FROM_ALLAPP_TO_LISTVERSION";

    /** Key to transfer values of app name from all app to list version via intent */
    String KEY_STRANFER_APP_NAME_FROM_ALLAPP_TO_LISTVERSION = "KEY_STRANFER_FROM_ALLAPP_TO_LISTVERSION";

    /**
     * Key to transfer values of version app id from list version to app detail
     * via intent
     */
    String KEY_STRANFER_FROM_LISTVERSION_TO_DETAIL_APPID = "KEY_STRANFER_FROM_LISTVERSION_TO_DETAIL_APPID";

    /** Key to transfer values of app id */
    String KEY_APP_ID = "KEY_APP_ID";

    /** Key to transfer values of version id */
    String KEY_VERSION_APP = "KEY_VERSION_ID";

    String KEY_APP_NAME = "KEY_APP_NAME";

    /**
     * Key to transfer values of version id from all app to list version via
     * intent
     */
    String KEY_STRANFER_FROM_LISTVERSION_TO_DETAIL_VERSIONID = "KEY_STRANFER_FROM_LISTVERSION_TO_DETAIL_VERSIONID";

    String LOGOUT_RESULT_ACTION_NAME = "Logout";

    String VERSION_INSTALLED = " (Installed)";

    String VERSION = "Version ";

    String RELEASED = "Released ";

    /*
     * ******************************* MESAGESS OF DIALOG
     * ********************************
     */
    String NETWORK_FAILED = "Network Failed !";

    String CHECK_NETWORK = "Check network to get data";

    String BUTTON_NAME_YES = "YES";

    String BUTTON_NAME_OK = "OK";

    String BUTTON_NAME_NO = "NO";

    String LOADING_MESSAGES = "Loading...";

    String FEED_BACK_TITLE = "Feed Back";

    String FEED_BACK_COMPLATE = "Feed Back Suscess";

    String FEED_BACK_ERROR = "Feed Back Error";

    String CHANGER_PASSWORD_TITLE = "DirecTV";

    String CHANGER_PASSWORD_COMPLATE = "Change Password Complated";

    String CHANGER_PASSWORD_ERROR = "Change Password Error";

    String FORGOT_PASSWORD_TITLE = "Forgot Password";

    String FORGOT_PASSWORD_COMPLATE = "Forgot Password Suscess";

    String FORGOT_PASSWORD_ERROR = "Forgot Password Error";

    String RESULT_TRUE = "1";

    String RESULT_FALSE = "0";

    /*
     * ******************************* MESAGESS OF TEXT VIEW
     * *****************************
     */
    String EMAIL_PASSWORD_INVALID = "Email or password invalid";

    String EMAIL_OK = "Email OK";

    String EMAIL_INCORRECT = "Email incorrect";

    String PASSWORD_INCORRECT = "Password incorrect";

    String OLD_PASSWORD_INCORRECT = "Old passowrd incorrect";

    String NEW_PASSWORD_INCORRECT = "New passowrd incorrect";

    String CONFIRM_PASSWORD_INCORRECT = "Confirm passowrd incorrect";

    String CONFIRM_PASSWORD_NOT_EQ_NEW = "Confirm password not equals to new password";

    String FIRST_NAME_NOT_NULL = "First name not null";

    String LAST_NAME_NOT_NULL = "Last name not null";

    String DEPARTMENT_NOT_NULL = "Department not null";

    String EMPLOYEE_NOT_NULL = "Employee not null";

    String REASON_NOT_NULL = "Reason for signing up not null";

    String TITLE_NOT_NULL = "Title not null";

    String CONTENT_NOT_NULL = "Content not null";

    /*
     * ********************* MESAGESS OF LIST VIEW *********************
     */
    String LASTEST_VERSION = "Lastest version: ";

    /*
     * ************************ TAB HOST NAME ******************
     */
    String TAB_HOST_ALL_APPS = "AllApp";

    String TAB_HOST_UPDATE = "Updates";

    /* ****************** MESAGESS OF TOAT ******************** */
    String NOT_SIGNUP = "You don't signin or signup or incorrect acount";

    /* ****************** DATE FORMAT PARTTEN ***************** */
    String DATE_FORMAT_STRING_TO_DATE = "dd-MM-yyyy HH:mm:ss";

    String DATE_FORMAT_DATE_TO_STRING = "MMM dd, yyyy";

    /************************************** Activity for reslut *******************************/
    int INTENT_REQUEST_CODE = 123;;

    /* **************** FEED BACK PARAM ********************* */
    String PARAM_FEED_BACK_SUBJECT = "subject";

    String PARAM_FEED_BACK_COMMENT = "comment";

    String PARAM_FEED_BACK_TOKENID = "tokenId";

    String PARAM_FEED_BACK_ACCOUNT = "account";

    String PARAM_FEED_BACK_INFODEVICE = "infoDevice";

    /* ***************** CHANGER PASSWORD PARAM ************** */

    String PARAM_CHANGE_PASSWORD_OLD_PASSWORD = "oldPassword";

    String PARAM_CHANGE_PASSWORD_NEW_PASSWORD = "newPassword";

    String PARAM_CHANGE_PASSWORD_CONFIRM_PASSWORD = "confirmPassword";

    String PARAM_CHANGE_PASSWORD_TOKENID = "tokenId";

    /* ***************** FORGOT PASSWORD PARAM ************** */
    String PARAM_FORGOT_PASSWORD_EMAIL = "email";

    /* ****************** UPDATES SERVICE************** */
    String PARAM_UPDATES_TOKENID = "tokenId";

    String PARAM_INSTALLED_APP = "installedAppInfo";

    /******************** TRUE OR FALSE***************/
    String TRUE = "true";

    /******************** NEW ***************/
    String NEW = "new";

    int INTERVAL_TIME = 30000; // 30 seconds

    String FROM_NOTIFICATION_BAR = "fromNotificationBar";

    String OS_NAME = "ANDROID_MOBILE:ANDROID:";

    /*******************special charecter for list old app**************/
    String SPECIAL_CHAR = ";";

    //String URL_LIST_KHOI_THI_CO_DAP_AN = "http://10.16.5.44:8888/dtvapps/listKhoiThiCoDapAn.txt";
    //String URL_LIST_MON_THI_CO_DAP_AN = "http://10.16.5.44:8888/dtvapps/listMonThiCoDapAn.txt";
    String URL_LIST_KHOI_THI_CO_DAP_AN = "http://app.tradiemthi.net/gateway/khoi-thi";
	String URL_LIST_MON_THI_CO_DAP_AN = "http://app.tradiemthi.net/gateway/khoi-thi/";
	String URL_LIST_DAP_AN_CUA_MON_THI = "http://app.tradiemthi.net/gateway/dap-an/";
	String URL_LIST_TRUONG_CO_TY_LE_CHOI = "http://app.tradiemthi.net/gateway/ty-le-choi";
	String URL_TY_LE_CHOI = "http://app.tradiemthi.net/gateway/ty-le-choi/";
	String URL_TRUONG_CO_DIEM_CHUAN = "http://app.tradiemthi.net/gateway/diem-chuan/";
    String PARAM_KHOI_THI_ID = "khoiThiId";

    String PARAM_MON_THI_ID = "monThiId";

    String PARAM_TRUONG_ID = "idTruong";

    String TYPE_TY_LE_CHOI = "tyLeChoi";

    String TYPE_DIEM_CHUAN = "diemChuan";
}
